package com.hkbigdata.sybx.service.ipml;


import com.hkbigdata.sybx.bean.Admin;
import com.hkbigdata.sybx.mapper.AdminMapper;
import com.hkbigdata.sybx.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yangjing
 * @creat 2025-05-07-11:43
 * @email 3010335359@qq.com
 */
@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public List<Admin> getAllUsers() {
        return adminMapper.getAllUsers();
    }

    @Override
    public Admin getAdminBeanByAccount(String admin_phone) {
        return adminMapper.getAdminBeanByAccount(admin_phone);
    }

    @Override
    public int addAdmin(Admin admin) {
        return adminMapper.addAdmin(admin);
    }
    // 新增方法实现
    @Override
    public int deleteAdmin(String admin_phone) {
        return adminMapper.deleteAdmin(admin_phone);
    }

    @Override
    public int updateAdmin(Admin admin) {
        return adminMapper.updateAdmin(admin);
    }
}
